package com.webbei.Backstage.action;

import java.io.IOException;

import org.apache.struts2.ServletActionContext;

import com.webbei.Backstage.service.BackstateSer;

public class updateLabelIsRewiewAction {
	private BackstateSer bao;
	private int labelId;
	private int isReview;
	
	public String execute(){
		System.out.println(labelId+","+isReview);
		int i=bao.updateLabelReview(labelId,isReview);
		if(i==1){
			message("success");
		}else{
			message("fail");
		}
		return null;
	}
	public void message(String str){
		try {
			ServletActionContext.getResponse().getWriter().write(str);
			ServletActionContext.getResponse().setContentType("text/html");
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public BackstateSer getBao() {
		return bao;
	}
	public void setBao(BackstateSer bao) {
		this.bao = bao;
	}
	public int getLabelId() {
		return labelId;
	}
	public void setLabelId(int labelId) {
		this.labelId = labelId;
	}
	public int getIsReview() {
		return isReview;
	}
	public void setIsReview(int isReview) {
		this.isReview = isReview;
	}
	
}
